Skip to content

feat: Add api, fuzzer and mapper for TagsTagBinding - #5416

Merged
google-oss-prow[bot] merged 2 commits into
GoogleCloudPlatform:masterfrom
yuwenma:tag-binding
Oct 22, 2025
Merged

feat: Add api, fuzzer and mapper for TagsTagBinding#5416
google-oss-prow[bot] merged 2 commits into
GoogleCloudPlatform:masterfrom
yuwenma:tag-binding

Conversation

@yuwenma

@yuwenma yuwenma commented Oct 13, 2025

Copy link
Copy Markdown
Contributor

BRIEF Change description

Fixes #

WHY do we need this change?

Special notes for your reviewer:

Does this PR add something which needs to be 'release noted'?


  • Reviewer reviewed release note.

Additional documentation e.g., references, usage docs, etc.:


Intended Milestone

Please indicate the intended milestone.

  • Reviewer tagged PR with the actual milestone.

Tests you have done

  • Run make ready-pr to ensure this PR is ready for review.
  • Perform necessary E2E testing for changed resources.

@yuwenma

yuwenma commented Oct 13, 2025

Copy link
Copy Markdown
Contributor Author

issue #5299

@yuwenma

yuwenma commented Oct 14, 2025

Copy link
Copy Markdown
Contributor Author

/assign @justinsb

return obj.Spec.ParentRef.External, nil
}
if obj.Spec.ParentRef.Name != "" {
// TODO: This is not quite right, we need to resolve the project number.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been calling common.NormalizeRefs first (and then we can treat External == "" as an error)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah - a meta point - this is why it's problematic to introduce identity & reference here. AFAICT this code is currently unused and therefore untested?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, it is unused and untested. It would be changed in the next PR (controller)

// If the "External" is given in the other resource's spec.TagsTagValueRef, the given value will be used.
// Otherwise, the "Name" and "Namespace" will be used to query the actual TagsTagValue object from the cluster.
func (r *TagsTagValueRef) NormalizedExternal(ctx context.Context, reader client.Reader, otherNamespace string) (string, error) {
if r.External != "" && r.Name != "" {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use the common function?

@justinsb justinsb left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CRD changes (or lack of changes!) look good

Identity/Reference code looks more problematic, and is not tested in this PR. Split into another PR. Or maybe we can find a way to test it now, if you really want to do it in this PR.

@yuwenma

yuwenma commented Oct 15, 2025

Copy link
Copy Markdown
Contributor Author

CRD changes (or lack of changes!) look good

Identity/Reference code looks more problematic, and is not tested in this PR. Split into another PR. Or maybe we can find a way to test it now, if you really want to do it in this PR.

I want to merge this PR and have the code template fixed in a separate PR, and have this identity/reference fixed in the next controller PR. Theoretically the identity and reference in this PR shows that they come from the right place: generate.sh if the file does not exist., which uses the code template.

@yuwenma
yuwenma marked this pull request as draft October 17, 2025 20:57
@yuwenma
yuwenma marked this pull request as ready for review October 22, 2025 14:58
@yuwenma

yuwenma commented Oct 22, 2025

Copy link
Copy Markdown
Contributor Author

CRD changes (or lack of changes!) look good

Identity/Reference code looks more problematic, and is not tested in this PR. Split into another PR. Or maybe we can find a way to test it now, if you really want to do it in this PR.

Removed the identity and reference files from this PR.

@yuwenma

yuwenma commented Oct 22, 2025

Copy link
Copy Markdown
Contributor Author

issue #5487

@google-oss-prow google-oss-prow Bot added the lgtm label Oct 22, 2025
@google-oss-prow

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow
google-oss-prow Bot merged commit 5b5158e into GoogleCloudPlatform:master Oct 22, 2025
110 checks passed
@cheftako cheftako added this to the 1.138 milestone Dec 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants